
class Device {
    int? status;
    Result? result;

    Device({this.status, this.result});

    Device.fromJson(Map<String, dynamic> json) {
        this.status = json["status"];
        this.result = json["result"] == null ? null : Result.fromJson(json["result"]);
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data["status"] = this.status;
        if(this.result != null)
            data["result"] = this.result?.toJson();
        return data;
    }
}

class Result {
    List<Records>? records;
    int? total;
    int? size;
    int? current;
    List<dynamic>? orders;
    bool? searchCount;
    int? pages;

    Result({this.records, this.total, this.size, this.current, this.orders, this.searchCount, this.pages});

    Result.fromJson(Map<String, dynamic> json) {
        this.records = json["records"]==null ? null : (json["records"] as List).map((e)=>Records.fromJson(e)).toList();
        this.total = json["total"];
        this.size = json["size"];
        this.current = json["current"];
        this.orders = json["orders"] ?? [];
        this.searchCount = json["searchCount"];
        this.pages = json["pages"];
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        if(this.records != null)
            data["records"] = this.records?.map((e)=>e.toJson()).toList();
        data["total"] = this.total;
        data["size"] = this.size;
        data["current"] = this.current;
        if(this.orders != null)
            data["orders"] = this.orders;
        data["searchCount"] = this.searchCount;
        data["pages"] = this.pages;
        return data;
    }
}

class Records {
    int? jourDeviceId;
    int? devBrandId;
    String? devNickname;
    String? devSn;
    int? devRoad;
    int? devMainLabel;
    String? devSpare2;
    String? devTime;
    int? devFirstType;
    int? devSecondType;
    int? devEnableState;
    int? devKwhState;
    String? brandName;
    String? brandType;
    String? brandModel;
    String? idftName;
    String? idstName;
    int? hsId;
    String? hsAddCommunity;
    String? dftIcon;

    Records({this.jourDeviceId, this.devBrandId, this.devNickname, this.devSn, this.devRoad, this.devMainLabel, this.devSpare2, this.devTime, this.devFirstType, this.devSecondType, this.devEnableState, this.devKwhState, this.brandName, this.brandType, this.brandModel, this.idftName, this.idstName, this.hsId, this.hsAddCommunity, this.dftIcon});

    Records.fromJson(Map<String, dynamic> json) {
        this.jourDeviceId = json["jourDeviceId"];
        this.devBrandId = json["devBrandId"];
        this.devNickname = json["devNickname"];
        this.devSn = json["devSn"];
        this.devRoad = json["devRoad"];
        this.devMainLabel = json["devMainLabel"];
        this.devSpare2 = json["devSpare2"];
        this.devTime = json["devTime"];
        this.devFirstType = json["devFirstType"];
        this.devSecondType = json["devSecondType"];
        this.devEnableState = json["devEnableState"];
        this.devKwhState = json["devKwhState"];
        this.brandName = json["brandName"];
        this.brandType = json["brandType"];
        this.brandModel = json["brandModel"];
        this.idftName = json["idftName"];
        this.idstName = json["idstName"];
        this.hsId = json["hsId"];
        this.hsAddCommunity = json["hsAddCommunity"];
        this.dftIcon = json["dftIcon"];
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data["jourDeviceId"] = this.jourDeviceId;
        data["devBrandId"] = this.devBrandId;
        data["devNickname"] = this.devNickname;
        data["devSn"] = this.devSn;
        data["devRoad"] = this.devRoad;
        data["devMainLabel"] = this.devMainLabel;
        data["devSpare2"] = this.devSpare2;
        data["devTime"] = this.devTime;
        data["devFirstType"] = this.devFirstType;
        data["devSecondType"] = this.devSecondType;
        data["devEnableState"] = this.devEnableState;
        data["devKwhState"] = this.devKwhState;
        data["brandName"] = this.brandName;
        data["brandType"] = this.brandType;
        data["brandModel"] = this.brandModel;
        data["idftName"] = this.idftName;
        data["idstName"] = this.idstName;
        data["hsId"] = this.hsId;
        data["hsAddCommunity"] = this.hsAddCommunity;
        data["dftIcon"] = this.dftIcon;
        return data;
    }
}